package com.itheima.oop.d6_homework.practise02;

/**
 * 实体类 JavaBean
 */
public class Student {
    private String name;
    private int age;

    public Student(){ //无参构造器

    }

    public Student(String name,int age) { //有参构造器
        this.age = age;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void show(){
        System.out.println("姓名:" + name + ",年龄: " + age);
    }
}
